<?php

namespace common\models\shop;

use Yii;

/**
 * This is the model class for table "{{%shop_store_type}}".
 *
 * @property int $id
 * @property string $name 类型名称
 * @property string $thumb 图标
 * @property string $description 描述
 * @property int $status
 * @property int $created_at
 * @property int $updated_at
 * @property int $deleted_at
 */
class ShopStoreType extends \common\db\ActiveRecord {

    /**
     * 店铺类型状态
     */
    CONST STATUS_DEFAULT = 0;
    CONST STATUS_ACTIVE = 10;

    /**
     * {@inheritdoc}
     */
    public static function tableName() {
        return '{{%shop_store_type}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules() {
        return [
            [['name'], 'required'],
            [['status', 'created_at', 'updated_at', 'deleted_at'], 'integer'],
            [['name'], 'string', 'max' => 20],
            [['thumb', 'description'], 'string', 'max' => 255],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels() {
        return [
            'id' => 'ID',
            'name' => '类型名称',
            'thumb' => '图标',
            'description' => '描述',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
            'deleted_at' => 'Deleted At',
        ];
    }

}
